package com.school.repair.dao;

import com.school.repair.entity.Equipment;
import com.school.repair.entity.EquipmentType;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface EquipmentDao {
    //查询所有的设备类型
    List<EquipmentType> findType();

    List<Equipment> equipmentListBy(@Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("typeId") long typeId, @Param("name") String name, @Param("unitid") long unitid);

    int totalBy(@Param("typeId") long typeId, @Param("name") String name, @Param("unitid") long unitid);

    Equipment equipmentGet(@Param("id") long id);

    int equipmentUpdate(Equipment equipment);

    int changeStatus(@Param("id") long id, @Param("status") long status);

    int unitAddEquipment(Equipment e);

    int delete(@Param("id") long id);

    int total(@Param("createdate") Date createdate, @Param("name") String name, @Param("id") long id);

    List<Equipment> paging(@Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("createdate") Date createdate, @Param("name") String name, @Param("id") long id);

    List<Equipment> equipmentSearch(@Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("typeId") long typeId, @Param("name") String name, @Param("id") long id);

    int equipmentSearchTotal(@Param("typeId") long typeId, @Param("name") String name, @Param("id") long id);

    int addBarCode(@Param("id") long id, @Param("barCode") String barCode);
}
